/**
 * 作者：陈文斌 on 2019/1/5.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:flutter/material.dart';
import 'client_manager_list.dart';

class ClientManagerListViewSection extends StatefulWidget {
  final TabController tabController;
  final List<String> tabTitles;

  @override
  ClientManagerListViewSection({
    Key key,
    this.tabController,
    this.tabTitles,
  }) : super(key: key);

  State<StatefulWidget> createState() => _ClientManagerListViewSectionState();
}

class _ClientManagerListViewSectionState
    extends State<ClientManagerListViewSection> {
  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: TabBarView(
        controller: widget.tabController,
        children: widget.tabTitles.map((title) {
          return ClientManagerList(
            clientType: title == '我的客户' ? 0 : 1,
          );
        }).toList(),
      ),
    );
  }
}
